import { Alova } from '@/utils/http/alova/index';

// 定义数据模型接口
export interface ShoeModelItem {
  modelId: string;
  modelName: string;
  prodFactory: string;
  workingVoltage: string;
  batteryLife: number;
  workingTemperature: string;
  ipRating: string;
  remark: string;
  createTime: string;
  createName: string;
}

export interface ShoeModelParams {
  modelName?: string;
  currentPage: number;
  pageSize: number;
}

export interface ShoeModelPageResult {
  records: ShoeModelItem[];
  total: number;
  size: number;
  current: number;
  pages: number;
}

/**
 * @description: 获取铁鞋型号分页列表
 */
export function getShoeModelList(params: ShoeModelParams) {
  return Alova.Post<ShoeModelPageResult>(
    `/web/eqShoeModel/page`, 
    { params }
  );
}

/**
 * @description: 新增铁鞋型号
 */
export function addShoeModel(params: any) {
  return Alova.Post(
    `/web/eqShoeModel/add`, 
    { params }
  );
}

/**
 * @description: 更新铁鞋型号
 */
export function updateShoeModel(params: any) {
  return Alova.Post(
    `/web/eqShoeModel/update`, 
    { params }
  );
}

/**
 * @description: 删除铁鞋型号
 */
export function deleteShoeModel(params: { modelId: string }) {
  return Alova.Post(
    `/web/eqShoeModel/delete`, 
    { params }
  );
}

/**
 * @description: 批量删除铁鞋型号
 */
export function batchDeleteShoeModel(params: { modelIds: string[] }) {
  return Alova.Post(
    `/web/eqShoeModel/batchDelete`, 
    { params }
  );
}